import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Index'
import Login from '@/components/Login'
import User from '@/components/User'
import Role from '@/components/Role.vue'

import Location from "@/components/generic/location"
import Material from "@/components/generic/material"
import Store from "@/components/generic/store"
import Owner from "@/components/generic/owner"
import Vessel from "@/components/generic/vessel";
import Permission from '@/components/Permission'


//3IN
import WarehouseWarrant from '@/components/WarehouseWarrant.vue'
import Supplier from '@/components/Supplier.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children:[
        {
          path: '/system/user',
          name: 'User',
          component: User
        },
        {
          path: '/system/role',
          name: 'Role',
          component: Role
        },
        {
          path: '/generic/supplier',
          name: 'supplier',
          component:Supplier
        },
        {
          path: '/generic/location',
          name: 'location',
          component:Location
        },
        {
          path: '/generic/material',
          name: 'material',
          component:Material,
          path: '/generic/store',
          name: 'store',
          component: Store
        },
        {
          path: '/generic/owner',
          name: 'owner',
          component: Owner
        },
        {
          path: '/generic/vessel',
          name: 'vessel',
          component: Vessel
          },
//林锦斌，入库跳转路由
        {
          path: '/in/billInMaster/page',
          name: 'WarehouseWarrant',
          component: WarehouseWarrant
        },
        //供应商跳转
        {
          path: '/in/billInMaster/supplier',
          name: 'Supplier',
          component: Supplier
        },
        {
          path: '/system/permission',
          name: 'Permission',
          component: Permission
        },
      ]
    }
  ]
})
